home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++ / leda / 2 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  4.2 KB

  1. Path: lrz-muenchen.de!news
  2. From: Karl Martin Syring <syring@pollux.edv.agrar.tu-muenchen.de>
  3. Newsgroups: comp.lang.c++.leda
  4. Subject: Re: Compiling LEDA with MSVC++ 4.0
  5. Date: Wed, 07 Feb 1996 19:22:43 +0100
  6. Organization: Munich University of Technology
  7. Distribution: world
  8. Message-ID: <3118EDF3.4A4D@pollux.edv.agrar.tu-muenchen.de>
  9. References: <DMF020.6r@hauberl.greenie.muc.de>
  10. NNTP-Posting-Host: 141.40.105.129
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=us-ascii
  13. Content-Transfer-Encoding: 7bit
  14. X-Mailer: Mozilla 2.0b6a (WinNT; I)
  15.  
  16. This is from my knowledge base (untested):
  17.  
  18. --------------------------------------------------------------------------
  19. From: daniel_goldwater@brown.edu (Dan Goldwater)
  20.  
  21. Newsgroups: comp.lang.c++.leda
  22.  
  23. Subject: SUCCESS! Compiling LEDA using MS Visual C.
  24.  
  25. Date: Tue, 28 Nov 1995 08:00:27 GMT
  26.  
  27. Organization: Brown University
  28.  
  29.  
  30.  
  31.  
  32. I have successfully compiled LEDA with Microsoft Visual C v4.0.  Here
  33.  
  34. is information on how to do it.
  35.  
  36.  
  37.  
  38. 1) it won't work with visual c v2.2 or lower.  you need to get MS
  39.  
  40. Visual C v4.0, which was just released.
  41.  
  42.  
  43.  
  44. 2) you need a makefile.  here is mine:
  45.  
  46.  
  47.  
  48. ***************** begin make_lib.bat *********************
  49.  
  50.  
  51.  
  52. echo *** THIS WILL MAKE ANY UNMADE STUFF ***
  53.  
  54.  
  55.  
  56. rem microsoft's lib is a bit bogus in that the /out: parameter
  57.  
  58. rem is required
  59.  
  60. rem if you want to create a new .lib file, but cannot be
  61.  
  62. rem used to add to
  63.  
  64. rem an existing .lib (it will overwrite an existing lib).
  65.  
  66.  
  67.  
  68. cd src\basic
  69.  
  70. nmake /nologo /i /f ..\make.src L=libL
  71.  
  72. lib /nologo /out:..\..\libL.lib *.obj
  73.  
  74.  
  75.  
  76. cd ..\basic_alg
  77.  
  78. nmake /nologo /i /f ..\make.src L=libL
  79.  
  80. lib /nologo ..\..\libL.lib *.obj
  81.  
  82.  
  83.  
  84. cd ..\numbers
  85.  
  86. nmake /nologo /i /f ..\make.src L=libL
  87.  
  88. lib /nologo ..\..\libL.lib *.obj
  89.  
  90.  
  91.  
  92. cd ..\dict
  93.  
  94. nmake /nologo /i /f ..\make.src L=libL
  95.  
  96. lib /nologo ..\..\libL.lib *.obj
  97.  
  98.  
  99.  
  100. cd ..\prio
  101.  
  102. nmake /nologo /i /f ..\make.src L=libL
  103.  
  104. lib /nologo ..\..\libL.lib *.obj
  105.  
  106.  
  107.  
  108. cd ..\graph
  109.  
  110. nmake /nologo /i /f ..\make.src L=libG
  111.  
  112. lib /nologo /out:..\..\libG.lib *.obj
  113.  
  114.  
  115.  
  116. cd ..\graph_alg
  117.  
  118. nmake /nologo /i /f ..\make.src L=libG
  119.  
  120. lib /nologo ..\..\libG.lib *.obj
  121.  
  122.  
  123.  
  124. cd ..\plane
  125.  
  126. nmake /nologo /i /f ..\make.src L=libP
  127.  
  128. lib /nologo /out:..\..\libP.lib *.obj
  129.  
  130.  
  131.  
  132. cd ..\plane_alg
  133.  
  134. nmake /nologo /i /f ..\make.src L=libP
  135.  
  136. lib /nologo ..\..\libP.lib *.obj
  137.  
  138.  
  139.  
  140. cd ..\window
  141.  
  142. nmake /nologo /i /f ..\make.src L=libP
  143.  
  144. lib /nologo ..\..\libP.lib *.obj
  145.  
  146.  
  147.  
  148. rem the msdos windowing stuff isnt going to work without some work.
  149.  
  150. rem cd ..\msdos
  151.  
  152. rem nmake /nologo /i /f ..\make.src L=libWx
  153.  
  154. rem lib /nologo /out:..\..\libWx.lib *.obj
  155.  
  156.  
  157.  
  158. cd ..\..
  159.  
  160.  
  161.  
  162. ************************ end make_lib.bat ***********************
  163.  
  164.  
  165.  
  166. put the make_lib.bat in the root of the unzipped leda stuff.
  167.  
  168.  
  169.  
  170. 3) here is a new make.src with the right CFLAGS for MSC.  put it in
  171.  
  172. the LEDA /src directory (replacing the existing make.src).
  173.  
  174.  
  175.  
  176. *************************** begin make.src ***********************
  177.  
  178.  
  179.  
  180. #----------------------------------------------------------------
  181.  
  182. # Microsoft Visual C++ 4.x (_MSV_VER >= 1000)
  183.  
  184. #
  185.  
  186. # note: microsoft's lib is an oddball, so we use it in
  187.  
  188. # make_lib.bat instead.
  189.  
  190. #---------------------------------------------------------------
  191.  
  192.  
  193.  
  194. LIB    = ..\..\$(L).lib
  195.  
  196. CFLAGS = /nologo
  197.  
  198. # compat: /vmg /GX /Za /Op-
  199.  
  200. # speed: /G5 /O2 /Ob2
  201.  
  202. o      = .obj
  203.  
  204.  
  205.  
  206. .c.obj:
  207.  
  208.  cl $(CFLAGS) /c /Tp $*.c
  209.  
  210. #        lib /out:$(LIB) $*.obj
  211.  
  212.  
  213.  
  214. all: $(LIB)
  215.  
  216.  
  217.  
  218. !include Make.lst
  219.  
  220.  
  221.  
  222. $(LIB): $(OBJECTS)
  223.  
  224.  
  225.  
  226. clean:
  227.  
  228.  rm -f $(OBJECTS)
  229.  
  230.  
  231.  
  232. ******************************* end make.src ***********************
  233.  
  234.  
  235.  
  236. 4) edit the /include/leda/system.h file.  this file is where leda has
  237.  
  238. some compiler-compatibility options.  you will need to undefine the
  239.  
  240. __TEMPLATE_FUNCTIONS__ option.  Note that the microsoft compiler
  241.  
  242. defines the _MSC_VER environment variable which corresponds to the
  243.  
  244. compiler version.  in visual c v4.0, _MSC_VER == 1000, since the
  245.  
  246. version of the actual compiler is v10.0.  _MSC_VER == 900 for visual c
  247.  
  248. v2.2.
  249.  
  250.  
  251.  
  252.  
  253.  
  254. 5) that should do it.  i got all but 2 .c files to compile using the
  255.  
  256. above setup with leda 3.2.2.  using leda 3.3 i think you may not have
  257.  
  258. to do step (4) above.  in any case, future leda versions and MSC
  259.  
  260. updates should resolve some of the compatibility problems.
  261.  
  262.  
  263.  
  264.  
  265.  
  266. ------------------------------------------------------------------
  267.  
  268. Dan Goldwater          daniel_goldwater@brown.edu
  269.